package com.rongke.enums;

/**
 * Created by bilibili on 2017/8/4.
 */
public enum FlowTypeEnum {
    ORDER(1,"订单"),TRANSFER(2,"转让"),WITHDRAWALS(3,"提现"),RECHARGE(4,"充值"),CASHBACKDUOBI(5,"购买哆币返现"),CASHBACKYABI(6,"购买雅币返现"),FEFUNDDUOBI(7,"哆币退款"),FEFUNDYABI(8,"雅币退款"),FEFUNDYWX(9,"微信退款"),FEFUNDYZFB(10,"支付宝退款"),EXPBONUS(11,"体验推荐审核通过雅币奖励"),QUES_BONUS(12,"填写有奖问卷奖励");


    private Integer type;
    private String typeName;
    FlowTypeEnum(Integer type, String typeName) {
        this.type = type;
        this.typeName = typeName;
    }


    /**
     * 根据type 获取typeName
     * @param type
     * @return
     */
    public static FlowTypeEnum getFlowTypeNameByType(Integer type) {
        for (FlowTypeEnum userTypeEnum: values()) {
            if (userTypeEnum.getType().equals(type)) {
                return userTypeEnum;
            }
        }
        return null;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }
}
